 
$(function()
	{

		//alert("pointer: "+ pointer);
		//alert("pagecols: "+ pagecols);

		// ##### GET LANGUAGE FROM <BODY> CLASS
		var bodyclassName = $('body').attr('class');


		// TO CHECK IF AN ELEMENT EXISTS OR NOT
		//$('element').length == 0; // no element found

		// ##### PARSE A QUERYSTRING ELEMENT FROM THE CURRENT URL
		function getParameterByName_URL(name) 
			{
				name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
				var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
				results = regex.exec(location.search);
				return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
			}

		// ##### LOOK FOR THE ?cid PART OF THE QUERYSTRING
		var querystring_cid = getParameterByName_URL("cid");
		if (querystring_cid == "") { querystring_cid = 1; }



		var specialcontent = "";
		if (typeof(specialcontent) === 'undefined') { var specialcontent = ""; }

		// PAGE DEFAULTS TO A 3 COLUMN LAYOUT IF pagecols ISN'T SET IN HTML FILE
		//if (typeof(pagecols) === 'undefined') { var pagecols = "3"; }

		// OVERRIDE - DO NOT PRESS!!!
		//var pagecols=2;

		if (pagecols == 3)
			{
				$("#maincontent #maincontent_center").removeClass('left-col');
				$("#maincontent #maincontent_center h1").removeClass('left-col');
				$("#maincontent #maincontent_center h1").removeClass('smaller');
				$("#maincontent #maincontent_center #pretitle").css('display', 'none');		
				$("#maincontent #text").removeClass('left-col');
				$("#maincontent #text").css('width', '360px');
				$("#maincontent #text").css('position', 'absolute');
				$("#maincontent #text").css('left', '188px');
				$("#maincontent #maincontent_right").removeClass('image');
			}
		else
			{
				$("#maincontent_left").css('display', 'none');
				$("#maincontent #maincontent_center #pretitle").css('display', 'block');
			}


		
		if (specialcontent == "sales")
			{
				// ##### ADJUST PADDING AROUND LINKS - THIS MAY HAVE TO CHANGE WHEN THE LINK TITLES CHANGES
					if (bodyclassName == "us") 	{ $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }  
				else if (bodyclassName == "fr") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); } 		
				else if (bodyclassName == "de") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); } 	
				else if (bodyclassName == "it") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }   
				else if (bodyclassName == "es") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 12px'); }   
				else if (bodyclassName == "au") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }  	
				else if (bodyclassName == "ru") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }   
				else							{ $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); } 	
			}
		else
			{
				// ##### ADJUST PADDING AROUND LINKS - THIS MAY HAVE TO CHANGE WHEN THE LINK TITLES CHANGES
					if (bodyclassName == "us") 	{ $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }  
				else if (bodyclassName == "fr") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); } 		
				else if (bodyclassName == "de") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); } 	
				else if (bodyclassName == "it") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }   
				else if (bodyclassName == "es") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 12px'); }   
				else if (bodyclassName == "au") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }  	
				else if (bodyclassName == "ru") { $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); }   
				else							{ $('.creative #boxholder #linksholder ul li a').css('padding', '0.2em 15px'); } 	
			}

		

		
		//if (typeof specialcontent === 'undefined') { var specialcontent = ""; }
		/* ##### HALLOWEEN SPECIAL CODE ##### */
		/*
		if (specialcontent == "halloween") {
			// ##### SWITCH CONTENT
			$("#maincontent").css("display", "none");
			$("#maincontent_halloween").css("display", "block");
				if (bodyclassName == "us") 	{ 	var pagetitle = halloween_title_us;		var pagetext = halloween_text_us;	var pageviewall = halloween_viewall_us; 	} 
			else if (bodyclassName == "fr")	{ 	var pagetitle = halloween_title_fr;		var pagetext = halloween_text_fr; 	var pageviewall = halloween_viewall_fr;		} 
			else if (bodyclassName == "de")	{ 	var pagetitle = halloween_title_de;		var pagetext = halloween_text_de; 	var pageviewall = halloween_viewall_de;		} 
			else if (bodyclassName == "it")	{ 	var pagetitle = halloween_title_it;		var pagetext = halloween_text_it; 	var pageviewall = halloween_viewall_it;		} 
			else if (bodyclassName == "es")	{ 	var pagetitle = halloween_title_es;		var pagetext = halloween_text_es; 	var pageviewall = halloween_viewall_es;		} 
			else if (bodyclassName == "au")	{ 	var pagetitle = halloween_title_au;		var pagetext = halloween_text_au; 	var pageviewall = halloween_viewall_au;		} 
			else if (bodyclassName == "ru")	{ 	var pagetitle = halloween_title_ru;		var pagetext = halloween_text_ru; 	var pageviewall = halloween_viewall_ru;		} 
			else 							{ 	var pagetitle = halloween_title_gb;		var pagetext = halloween_text_gb; 	var pageviewall = halloween_viewall_gb;		} 
			$('#text_halloween p:first-child').text($.trim(pagetext)); 
			$('#maincontent_center_halloween h1').text($.trim(pagetitle));
			$('.viewAll_linkText').text($.trim(pageviewall));
		} else {
			// ##### SWITCH CONTENT
			$("#maincontent").css("display", "block");
			$("#maincontent_halloween").css("display", "none");
		}
		*/
		/* ##### HALLOWEEN SPECIAL CODE ##### */


		$("#maincontent").css("display", "block");
		//$("#maincontent_halloween").css("display", "none");






		// GET LINKS CONTENT

		// ##### GET LINKS TITLE DEPENDING ON LANGUAGE (DEFAULTS TO GB)
			if (bodyclassName == "us")	{	var link1_language = linktitle_1_us;	var link2_language = linktitle_2_us;	var link3_language = linktitle_3_us;	var link4_language = linktitle_4_us;	var link5_language = linktitle_5_us;	var link6_language = linktitle_6_us;	}
		else if (bodyclassName == "fr")	{	var link1_language = linktitle_1_fr;	var link2_language = linktitle_2_fr;	var link3_language = linktitle_3_fr;	var link4_language = linktitle_4_fr;	var link5_language = linktitle_5_fr;	var link6_language = linktitle_6_fr;	}
		else if (bodyclassName == "de")	{	var link1_language = linktitle_1_de;	var link2_language = linktitle_2_de;	var link3_language = linktitle_3_de;	var link4_language = linktitle_4_de;	var link5_language = linktitle_5_de;	var link6_language = linktitle_6_de;	}
		else if (bodyclassName == "it")	{	var link1_language = linktitle_1_it;	var link2_language = linktitle_2_it;	var link3_language = linktitle_3_it;	var link4_language = linktitle_4_it;	var link5_language = linktitle_5_it;	var link6_language = linktitle_6_it;	}
		else if (bodyclassName == "es")	{	var link1_language = linktitle_1_es;	var link2_language = linktitle_2_es;	var link3_language = linktitle_3_es;	var link4_language = linktitle_4_es;	var link5_language = linktitle_5_es;	var link6_language = linktitle_6_es;	}
		else if (bodyclassName == "au")	{	var link1_language = linktitle_1_au;	var link2_language = linktitle_2_au;	var link3_language = linktitle_3_au;	var link4_language = linktitle_4_au;	var link5_language = linktitle_5_au;	var link6_language = linktitle_6_au;	}
		else if (bodyclassName == "ru")	{	var link1_language = linktitle_1_ru;	var link2_language = linktitle_2_ru;	var link3_language = linktitle_3_ru;	var link4_language = linktitle_4_ru;	var link5_language = linktitle_5_ru;	var link6_language = linktitle_6_ru;	}
		else							{	var link1_language = linktitle_1_gb;	var link2_language = linktitle_2_gb;	var link3_language = linktitle_3_gb;	var link4_language = linktitle_4_gb;	var link5_language = linktitle_5_gb;	var link6_language = linktitle_6_gb;	}

		// ##### LINKS HREF DEPENDING ON LANGUAGE (DEFAULTS TO GB)
			if (bodyclassName == "us")	{	var href1_language = linkhref_1_us;		var href2_language = linkhref_2_us;		var href3_language = linkhref_3_us;		var href4_language = linkhref_4_us;		var href5_language = linkhref_5_us;		var href6_language = linkhref_6_us;		}
		else if (bodyclassName == "fr")	{	var href1_language = linkhref_1_fr;		var href2_language = linkhref_2_fr;		var href3_language = linkhref_3_fr;		var href4_language = linkhref_4_fr;		var href5_language = linkhref_5_fr;		var href6_language = linkhref_6_fr;		}
		else if (bodyclassName == "de")	{	var href1_language = linkhref_1_de;		var href2_language = linkhref_2_de;		var href3_language = linkhref_3_de;		var href4_language = linkhref_4_de;		var href5_language = linkhref_5_de;		var href6_language = linkhref_6_de;		}
		else if (bodyclassName == "it")	{	var href1_language = linkhref_1_it;		var href2_language = linkhref_2_it;		var href3_language = linkhref_3_it;		var href4_language = linkhref_4_it;		var href5_language = linkhref_5_it;		var href6_language = linkhref_6_it;		}
		else if (bodyclassName == "es")	{	var href1_language = linkhref_1_es;		var href2_language = linkhref_2_es;		var href3_language = linkhref_3_es;		var href4_language = linkhref_4_es;		var href5_language = linkhref_5_es;		var href6_language = linkhref_6_es;		}
		else if (bodyclassName == "au")	{	var href1_language = linkhref_1_au;		var href2_language = linkhref_2_au;		var href3_language = linkhref_3_au;		var href4_language = linkhref_4_au;		var href5_language = linkhref_5_au;		var href6_language = linkhref_6_au;		}
		else if (bodyclassName == "ru")	{	var href1_language = linkhref_1_ru;		var href2_language = linkhref_2_ru;		var href3_language = linkhref_3_ru;		var href4_language = linkhref_4_ru;		var href5_language = linkhref_5_ru;		var href6_language = linkhref_6_ru;		}
		else							{	var href1_language = linkhref_1_gb;		var href2_language = linkhref_2_gb;		var href3_language = linkhref_3_gb;		var href4_language = linkhref_4_gb;		var href5_language = linkhref_5_gb;		var href6_language = linkhref_6_gb;		}

		// ##### DEFAULT TO GB IF LINK IS BLANK										// ##### DEFAULT TO GB IF HREF IS BLANK	
		if ($.trim(link1_language) == "") { link1_language = linktitle_1_gb; }		if ($.trim(href1_language) == "") { href1_language = linkhref_1_gb; }
		if ($.trim(link2_language) == "") { link2_language = linktitle_2_gb; }		if ($.trim(href2_language) == "") { href2_language = linkhref_2_gb; }
		if ($.trim(link3_language) == "") { link3_language = linktitle_3_gb; }		if ($.trim(href3_language) == "") { href3_language = linkhref_3_gb; }
		if ($.trim(link4_language) == "") { link4_language = linktitle_4_gb; }		if ($.trim(href4_language) == "") { href4_language = linkhref_4_gb; }
		if ($.trim(link5_language) == "") { link5_language = linktitle_5_gb; }		if ($.trim(href5_language) == "") { href5_language = linkhref_5_gb; }
		if ($.trim(link6_language) == "") { link6_language = linktitle_6_gb; }		if ($.trim(href6_language) == "") { href6_language = linkhref_6_gb; }

        // ##### "VIEW ALL" LINK HREF DEPENDING ON TAB (DEFAULTS TO GB)
		if (bodyclassName == "us") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_us; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_us; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_us; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_us; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_us; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_us; } }
		else if (bodyclassName == "fr") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_fr; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_fr; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_fr; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_fr; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_fr; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_fr; } }
		else if (bodyclassName == "de") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_de; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_de; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_de; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_de; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_de; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_de; } }
		else if (bodyclassName == "it") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_it; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_it; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_it; } else if (pointer == 'link4') {var viewAllBtnLink = buttonlink_4_it; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_it; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_it; } }
		else if (bodyclassName == "es") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_es; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_es; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_es; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_es; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_es; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_es; } }
		else if (bodyclassName == "au") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_au; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_au; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_au; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_au; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_au; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_au; } }
		else if (bodyclassName == "ru") { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_ru; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_ru; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_ru; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_ru; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_ru; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_ru; } }
		else { if (pointer == 'link1') { var viewAllBtnLink = buttonlink_1_gb; } else if (pointer == 'link2') { var viewAllBtnLink = buttonlink_2_gb; } else if (pointer == 'link3') { var viewAllBtnLink = buttonlink_3_gb; } else if (pointer == 'link4') { var viewAllBtnLink = buttonlink_4_gb; } else if (pointer == 'link5') { var viewAllBtnLink = buttonlink_5_gb; } else if (pointer == 'link6') { var viewAllBtnLink = buttonlink_6_gb; } }


    /*##### OVERRIDE FIRST LINK'S HREF IF HALLOWEEN IS SET ##### */
		// if (specialcontent == "halloween")
		// 	{
		// 			if (bodyclassName == "us") 	{ 	var href1_language = "http://us.asos.com/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";		} 
		// 		else if (bodyclassName == "fr")	{ 	var href1_language = "http://www.asos.fr/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";		} 
		// 		else if (bodyclassName == "de")	{ 	var href1_language = "http://www.asos.de/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";		} 
		// 		else if (bodyclassName == "it")	{ 	var href1_language = "http://www.asos.com/it/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";	} 
		// 		else if (bodyclassName == "es")	{ 	var href1_language = "http://www.asos.com/es/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";	} 
		// 		else if (bodyclassName == "au")	{ 	var href1_language = "http://www.asos.com/au/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";	} 
		// 		else if (bodyclassName == "ru")	{ 	var href1_language = "http://www.asos.com/ru/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";	} 
		// 		else 							{ 	var href1_language = "http://www.asos.com/Womens-Fashion-Trends-Styling/Fashion-Trends-Styling-22/Cat/pgecategory.aspx?cid=16286";		} 
		// 	}

		// ##### LINKS HREF DEPENDING ON LANGUAGE (DEFAULTS TO GB)
		/*	if (bodyclassName == "us")	{	var pagetext1_language = pagetext_1_us;		var pagetext2_language = pagetext_2_us;		var pagetext3_language = pagetext_3_us;		var pagetext4_language = pagetext_4_us;		var pagetext5_language = pagetext_5_us;		var pagetext6_language = pagetext_6_us;		}
		else if (bodyclassName == "fr")	{	var pagetext1_language = pagetext_1_fr;		var pagetext2_language = pagetext_2_fr;		var pagetext3_language = pagetext_3_fr;		var pagetext4_language = pagetext_4_fr;		var pagetext5_language = pagetext_5_fr;		var pagetext6_language = pagetext_6_fr;		}
		else if (bodyclassName == "de")	{	var pagetext1_language = pagetext_1_de;		var pagetext2_language = pagetext_2_de;		var pagetext3_language = pagetext_3_de;		var pagetext4_language = pagetext_4_de;		var pagetext5_language = pagetext_5_de;		var pagetext6_language = pagetext_6_de;		}
		else if (bodyclassName == "it")	{	var pagetext1_language = pagetext_1_it;		var pagetext2_language = pagetext_2_it;		var pagetext3_language = pagetext_3_it;		var pagetext4_language = pagetext_4_it;		var pagetext5_language = pagetext_5_it;		var pagetext6_language = pagetext_6_it;		}
		else if (bodyclassName == "es")	{	var pagetext1_language = pagetext_1_es;		var pagetext2_language = pagetext_2_es;		var pagetext3_language = pagetext_3_es;		var pagetext4_language = pagetext_4_es;		var pagetext5_language = pagetext_5_es;		var pagetext6_language = pagetext_6_es;		}
		else if (bodyclassName == "au")	{	var pagetext1_language = pagetext_1_au;		var pagetext2_language = pagetext_2_au;		var pagetext3_language = pagetext_3_au;		var pagetext4_language = pagetext_4_au;		var pagetext5_language = pagetext_5_au;		var pagetext6_language = pagetext_6_au;		}
		else if (bodyclassName == "ru")	{	var pagetext1_language = pagetext_1_ru;		var pagetext2_language = pagetext_2_ru;		var pagetext3_language = pagetext_3_ru;		var pagetext4_language = pagetext_4_ru;		var pagetext5_language = pagetext_5_ru;		var pagetext6_language = pagetext_6_ru;		}
		else							{	var pagetext1_language = pagetext_1_gb;		var pagetext2_language = pagetext_2_gb;		var pagetext3_language = pagetext_3_gb;		var pagetext4_language = pagetext_4_gb;		var pagetext5_language = pagetext_5_gb;		var pagetext6_language = pagetext_6_gb;		}
		*/
		// ##### PRE TITLE (applies to 2-col layout only)
			if (bodyclassName == "us") 	{ if (pointer == 'link1') { var pretitle = pretitle_1_us; } else if (pointer == 'link2') { var pretitle = pretitle_2_us; } else if (pointer == 'link3') { var pretitle = pretitle_3_us; } else if (pointer == 'link4') { var pretitle = pretitle_4_us; } else if (pointer == 'link5') { var pretitle = pretitle_5_us; } else if (pointer == 'link6') { var pretitle = pretitle_6_us; } }
		else if (bodyclassName == "fr")	{ if (pointer == 'link1') { var pretitle = pretitle_1_fr; } else if (pointer == 'link2') { var pretitle = pretitle_2_fr; } else if (pointer == 'link3') { var pretitle = pretitle_3_fr; } else if (pointer == 'link4') { var pretitle = pretitle_4_fr; } else if (pointer == 'link5') { var pretitle = pretitle_5_fr; } else if (pointer == 'link6') { var pretitle = pretitle_6_fr; } }
		else if (bodyclassName == "de")	{ if (pointer == 'link1') { var pretitle = pretitle_1_de; } else if (pointer == 'link2') { var pretitle = pretitle_2_de; } else if (pointer == 'link3') { var pretitle = pretitle_3_de; } else if (pointer == 'link4') { var pretitle = pretitle_4_de; } else if (pointer == 'link5') { var pretitle = pretitle_5_de; } else if (pointer == 'link6') { var pretitle = pretitle_6_de; } }
		else if (bodyclassName == "it")	{ if (pointer == 'link1') { var pretitle = pretitle_1_it; } else if (pointer == 'link2') { var pretitle = pretitle_2_it; } else if (pointer == 'link3') { var pretitle = pretitle_3_it; } else if (pointer == 'link4') { var pretitle = pretitle_4_it; } else if (pointer == 'link5') { var pretitle = pretitle_5_it; } else if (pointer == 'link6') { var pretitle = pretitle_6_it; } }
		else if (bodyclassName == "es")	{ if (pointer == 'link1') { var pretitle = pretitle_1_es; } else if (pointer == 'link2') { var pretitle = pretitle_2_es; } else if (pointer == 'link3') { var pretitle = pretitle_3_es; } else if (pointer == 'link4') { var pretitle = pretitle_4_es; } else if (pointer == 'link5') { var pretitle = pretitle_5_es; } else if (pointer == 'link6') { var pretitle = pretitle_6_es; } } 
		else if (bodyclassName == "au")	{ if (pointer == 'link1') { var pretitle = pretitle_1_au; } else if (pointer == 'link2') { var pretitle = pretitle_2_au; } else if (pointer == 'link3') { var pretitle = pretitle_3_au; } else if (pointer == 'link4') { var pretitle = pretitle_4_au; } else if (pointer == 'link5') { var pretitle = pretitle_5_au; } else if (pointer == 'link6') { var pretitle = pretitle_6_au; } }
		else if (bodyclassName == "ru")	{ if (pointer == 'link1') { var pretitle = pretitle_1_ru; } else if (pointer == 'link2') { var pretitle = pretitle_2_ru; } else if (pointer == 'link3') { var pretitle = pretitle_3_ru; } else if (pointer == 'link4') { var pretitle = pretitle_4_ru; } else if (pointer == 'link5') { var pretitle = pretitle_5_ru; } else if (pointer == 'link6') { var pretitle = pretitle_6_ru; } }
		else 							{ if (pointer == 'link1') { var pretitle = pretitle_1_gb; } else if (pointer == 'link2') { var pretitle = pretitle_2_gb; } else if (pointer == 'link3') { var pretitle = pretitle_3_gb; } else if (pointer == 'link4') { var pretitle = pretitle_4_gb; } else if (pointer == 'link5') { var pretitle = pretitle_5_gb; } else if (pointer == 'link6') { var pretitle = pretitle_6_gb; } }

		// ##### PAGE HEADING (h1)
			if (bodyclassName == "us") 	{ if (pointer == 'link1') { var heading = heading_1_us; } else if (pointer == 'link2') { var heading = heading_2_us; } else if (pointer == 'link3') { var heading = heading_3_us; } else if (pointer == 'link4') { var heading = heading_4_us; } else if (pointer == 'link5') { var heading = heading_5_us; } else if (pointer == 'link6') { var heading = heading_6_us; } }
		else if (bodyclassName == "fr")	{ if (pointer == 'link1') { var heading = heading_1_fr; } else if (pointer == 'link2') { var heading = heading_2_fr; } else if (pointer == 'link3') { var heading = heading_3_fr; } else if (pointer == 'link4') { var heading = heading_4_fr; } else if (pointer == 'link5') { var heading = heading_5_fr; } else if (pointer == 'link6') { var heading = heading_6_fr; } }
		else if (bodyclassName == "de")	{ if (pointer == 'link1') { var heading = heading_1_de; } else if (pointer == 'link2') { var heading = heading_2_de; } else if (pointer == 'link3') { var heading = heading_3_de; } else if (pointer == 'link4') { var heading = heading_4_de; } else if (pointer == 'link5') { var heading = heading_5_de; } else if (pointer == 'link6') { var heading = heading_6_de; } }
		else if (bodyclassName == "it")	{ if (pointer == 'link1') { var heading = heading_1_it; } else if (pointer == 'link2') { var heading = heading_2_it; } else if (pointer == 'link3') { var heading = heading_3_it; } else if (pointer == 'link4') { var heading = heading_4_it; } else if (pointer == 'link5') { var heading = heading_5_it; } else if (pointer == 'link6') { var heading = heading_6_it; } }
		else if (bodyclassName == "es")	{ if (pointer == 'link1') { var heading = heading_1_es; } else if (pointer == 'link2') { var heading = heading_2_es; } else if (pointer == 'link3') { var heading = heading_3_es; } else if (pointer == 'link4') { var heading = heading_4_es; } else if (pointer == 'link5') { var heading = heading_5_es; } else if (pointer == 'link6') { var heading = heading_6_es; } } 
		else if (bodyclassName == "au")	{ if (pointer == 'link1') { var heading = heading_1_au; } else if (pointer == 'link2') { var heading = heading_2_au; } else if (pointer == 'link3') { var heading = heading_3_au; } else if (pointer == 'link4') { var heading = heading_4_au; } else if (pointer == 'link5') { var heading = heading_5_au; } else if (pointer == 'link6') { var heading = heading_6_au; } }
		else if (bodyclassName == "ru")	{ if (pointer == 'link1') { var heading = heading_1_ru; } else if (pointer == 'link2') { var heading = heading_2_ru; } else if (pointer == 'link3') { var heading = heading_3_ru; } else if (pointer == 'link4') { var heading = heading_4_ru; } else if (pointer == 'link5') { var heading = heading_5_ru; } else if (pointer == 'link6') { var heading = heading_6_ru; } }
		else 							{ if (pointer == 'link1') { var heading = heading_1_gb; } else if (pointer == 'link2') { var heading = heading_2_gb; } else if (pointer == 'link3') { var heading = heading_3_gb; } else if (pointer == 'link4') { var heading = heading_4_gb; } else if (pointer == 'link5') { var heading = heading_5_gb; } else if (pointer == 'link6') { var heading = heading_6_gb; } }

		// ##### PAGE TEXT
			if (bodyclassName == "us") 	{ if (pointer == 'link1') { var pagetext = pagetext_1_us; } else if (pointer == 'link2') { var pagetext = pagetext_2_us; } else if (pointer == 'link3') { var pagetext = pagetext_3_us; } else if (pointer == 'link4') { var pagetext = pagetext_4_us; } else if (pointer == 'link5') { var pagetext = pagetext_5_us; } else if (pointer == 'link6') { var pagetext = pagetext_6_us; } }
		else if (bodyclassName == "fr")	{ if (pointer == 'link1') { var pagetext = pagetext_1_fr; } else if (pointer == 'link2') { var pagetext = pagetext_2_fr; } else if (pointer == 'link3') { var pagetext = pagetext_3_fr; } else if (pointer == 'link4') { var pagetext = pagetext_4_fr; } else if (pointer == 'link5') { var pagetext = pagetext_5_fr; } else if (pointer == 'link6') { var pagetext = pagetext_6_fr; } }
		else if (bodyclassName == "de")	{ if (pointer == 'link1') { var pagetext = pagetext_1_de; } else if (pointer == 'link2') { var pagetext = pagetext_2_de; } else if (pointer == 'link3') { var pagetext = pagetext_3_de; } else if (pointer == 'link4') { var pagetext = pagetext_4_de; } else if (pointer == 'link5') { var pagetext = pagetext_5_de; } else if (pointer == 'link6') { var pagetext = pagetext_6_de; } }
		else if (bodyclassName == "it")	{ if (pointer == 'link1') { var pagetext = pagetext_1_it; } else if (pointer == 'link2') { var pagetext = pagetext_2_it; } else if (pointer == 'link3') { var pagetext = pagetext_3_it; } else if (pointer == 'link4') { var pagetext = pagetext_4_it; } else if (pointer == 'link5') { var pagetext = pagetext_5_it; } else if (pointer == 'link6') { var pagetext = pagetext_6_it; } }
		else if (bodyclassName == "es")	{ if (pointer == 'link1') { var pagetext = pagetext_1_es; } else if (pointer == 'link2') { var pagetext = pagetext_2_es; } else if (pointer == 'link3') { var pagetext = pagetext_3_es; } else if (pointer == 'link4') { var pagetext = pagetext_4_es; } else if (pointer == 'link5') { var pagetext = pagetext_5_es; } else if (pointer == 'link6') { var pagetext = pagetext_6_es; } } 
		else if (bodyclassName == "au")	{ if (pointer == 'link1') { var pagetext = pagetext_1_au; } else if (pointer == 'link2') { var pagetext = pagetext_2_au; } else if (pointer == 'link3') { var pagetext = pagetext_3_au; } else if (pointer == 'link4') { var pagetext = pagetext_4_au; } else if (pointer == 'link5') { var pagetext = pagetext_5_au; } else if (pointer == 'link6') { var pagetext = pagetext_6_au; } }
		else if (bodyclassName == "ru")	{ if (pointer == 'link1') { var pagetext = pagetext_1_ru; } else if (pointer == 'link2') { var pagetext = pagetext_2_ru; } else if (pointer == 'link3') { var pagetext = pagetext_3_ru; } else if (pointer == 'link4') { var pagetext = pagetext_4_ru; } else if (pointer == 'link5') { var pagetext = pagetext_5_ru; } else if (pointer == 'link6') { var pagetext = pagetext_6_ru; } }
		else 							{ if (pointer == 'link1') { var pagetext = pagetext_1_gb; } else if (pointer == 'link2') { var pagetext = pagetext_2_gb; } else if (pointer == 'link3') { var pagetext = pagetext_3_gb; } else if (pointer == 'link4') { var pagetext = pagetext_4_gb; } else if (pointer == 'link5') { var pagetext = pagetext_5_gb; } else if (pointer == 'link6') { var pagetext = pagetext_6_gb; } }

		// ##### BUTTON TEXT
			if (bodyclassName == "us") 	{ if (pointer == 'link1') { var button = button_1_us; } else if (pointer == 'link2') { var button = button_2_us; } else if (pointer == 'link3') { var button = button_3_us; } else if (pointer == 'link4') { var button = button_4_us; } else if (pointer == 'link5') { var button = button_5_us; } else if (pointer == 'link6') { var button = button_6_us; } }
		else if (bodyclassName == "fr")	{ if (pointer == 'link1') { var button = button_1_fr; } else if (pointer == 'link2') { var button = button_2_fr; } else if (pointer == 'link3') { var button = button_3_fr; } else if (pointer == 'link4') { var button = button_4_fr; } else if (pointer == 'link5') { var button = button_5_fr; } else if (pointer == 'link6') { var button = button_6_fr; } }
		else if (bodyclassName == "de")	{ if (pointer == 'link1') { var button = button_1_de; } else if (pointer == 'link2') { var button = button_2_de; } else if (pointer == 'link3') { var button = button_3_de; } else if (pointer == 'link4') { var button = button_4_de; } else if (pointer == 'link5') { var button = button_5_de; } else if (pointer == 'link6') { var button = button_6_de; } }
		else if (bodyclassName == "it")	{ if (pointer == 'link1') { var button = button_1_it; } else if (pointer == 'link2') { var button = button_2_it; } else if (pointer == 'link3') { var button = button_3_it; } else if (pointer == 'link4') { var button = button_4_it; } else if (pointer == 'link5') { var button = button_5_it; } else if (pointer == 'link6') { var button = button_6_it; } }
		else if (bodyclassName == "es")	{ if (pointer == 'link1') { var button = button_1_es; } else if (pointer == 'link2') { var button = button_2_es; } else if (pointer == 'link3') { var button = button_3_es; } else if (pointer == 'link4') { var button = button_4_es; } else if (pointer == 'link5') { var button = button_5_es; } else if (pointer == 'link6') { var button = button_6_es; } } 
		else if (bodyclassName == "au")	{ if (pointer == 'link1') { var button = button_1_au; } else if (pointer == 'link2') { var button = button_2_au; } else if (pointer == 'link3') { var button = button_3_au; } else if (pointer == 'link4') { var button = button_4_au; } else if (pointer == 'link5') { var button = button_5_au; } else if (pointer == 'link6') { var button = button_6_au; } }
		else if (bodyclassName == "ru")	{ if (pointer == 'link1') { var button = button_1_ru; } else if (pointer == 'link2') { var button = button_2_ru; } else if (pointer == 'link3') { var button = button_3_ru; } else if (pointer == 'link4') { var button = button_4_ru; } else if (pointer == 'link5') { var button = button_5_ru; } else if (pointer == 'link6') { var button = button_6_ru; } }
		else 							{ if (pointer == 'link1') { var button = button_1_gb; } else if (pointer == 'link2') { var button = button_2_gb; } else if (pointer == 'link3') { var button = button_3_gb; } else if (pointer == 'link4') { var button = button_4_gb; } else if (pointer == 'link5') { var button = button_5_gb; } else if (pointer == 'link6') { var button = button_6_gb; } }
	
		
		// ##### BUTTON LINKS
		// $('.creative #button a').attr('href' , $.trim(buttonlink1));
		// $('.creative #button a').attr('href' , $.trim(buttonlink2));
		// $('.creative #button a').attr('href' , $.trim(buttonlink3));
		// $('.creative #button a').attr('href' , $.trim(buttonlink4));
		// $('.creative #button a').attr('href' , $.trim(buttonlink5));
		// $('.creative #button a').attr('href' , $.trim(buttonlink6));

		


		// ##### DEFAULT TO GB IF TEXT IS BLANK										
		if ($.trim(pagetext) == "") { pagetext = pagetext_1_gb; }
		if ($.trim(pagetext) == "") { pagetext = pagetext_2_gb; }
		if ($.trim(pagetext) == "") { pagetext = pagetext_3_gb; }
		if ($.trim(pagetext) == "") { pagetext = pagetext_4_gb; }
		if ($.trim(pagetext) == "") { pagetext = pagetext_5_gb; }
		if ($.trim(pagetext) == "") { pagetext = pagetext_6_gb; }

		// ##### CHANGE THE TEXT ON DISPLAY							// ##### CHANGE THE LINKS 
		$('.creative .link1 a').text($.trim(link1_language));		$('.creative .link1 a').attr('href' , $.trim(href1_language));
		$('.creative .link2 a').text($.trim(link2_language));		$('.creative .link2 a').attr('href' , $.trim(href2_language));
		$('.creative .link3 a').text($.trim(link3_language));		$('.creative .link3 a').attr('href' , $.trim(href3_language));
		$('.creative .link4 a').text($.trim(link4_language));		$('.creative .link4 a').attr('href' , $.trim(href4_language));
		$('.creative .link5 a').text($.trim(link5_language));		$('.creative .link5 a').attr('href' , $.trim(href5_language));
		$('.creative .link6 a').text($.trim(link6_language));		$('.creative .link6 a').attr('href' , $.trim(href6_language));


		// MAKE BUTTON INVISIBLE IF THERE IS NO TEXT FOR IT
		if ($.trim(button) == "")
			{
				$("#button").css('display','none');
			}
		else
			{
				// ##### CHANGE THE BUTTON URL
				$('.creative #button').attr('href', $.trim(viewAllBtnLink));

				// ##### CHANGE THE BUTTON TEXT
				$('#button span').text($.trim(button));

				// MAKE THE BUTTON SHOW UP
				$("#button").css('color','#000');
				$("#button").css('border','3px solid #000');
				$(".creative a#button span").css('background','url("http://images.asos.com/htmlpages/assets/link-background-black.png") no-repeat scroll right center rgba(0, 0, 0, 0)');
			}
        



		// ##### PAGE TITLE
			if (bodyclassName == "us") 	{ if (pointer == 'link1') { var pagetitle = linktitle_1_us; } else if (pointer == 'link2') { var pagetitle = linktitle_2_us; } else if (pointer == 'link3') { var pagetitle = linktitle_3_us; } else if (pointer == 'link4') { var pagetitle = linktitle_4_us; } else if (pointer == 'link5') { var pagetitle = linktitle_5_us; } else if (pointer == 'link6') { var pagetitle = linktitle_6_us; } }
		else if (bodyclassName == "fr")	{ if (pointer == 'link1') { var pagetitle = linktitle_1_fr; } else if (pointer == 'link2') { var pagetitle = linktitle_2_fr; } else if (pointer == 'link3') { var pagetitle = linktitle_3_fr; } else if (pointer == 'link4') { var pagetitle = linktitle_4_fr; } else if (pointer == 'link5') { var pagetitle = linktitle_5_fr; } else if (pointer == 'link6') { var pagetitle = linktitle_6_fr; } }
		else if (bodyclassName == "de")	{ if (pointer == 'link1') { var pagetitle = linktitle_1_de; } else if (pointer == 'link2') { var pagetitle = linktitle_2_de; } else if (pointer == 'link3') { var pagetitle = linktitle_3_de; } else if (pointer == 'link4') { var pagetitle = linktitle_4_de; } else if (pointer == 'link5') { var pagetitle = linktitle_5_de; } else if (pointer == 'link6') { var pagetitle = linktitle_6_de; } }
		else if (bodyclassName == "it")	{ if (pointer == 'link1') { var pagetitle = linktitle_1_it; } else if (pointer == 'link2') { var pagetitle = linktitle_2_it; } else if (pointer == 'link3') { var pagetitle = linktitle_3_it; } else if (pointer == 'link4') { var pagetitle = linktitle_4_it; } else if (pointer == 'link5') { var pagetitle = linktitle_5_it; } else if (pointer == 'link6') { var pagetitle = linktitle_6_it; } }
		else if (bodyclassName == "es")	{ if (pointer == 'link1') { var pagetitle = linktitle_1_es; } else if (pointer == 'link2') { var pagetitle = linktitle_2_es; } else if (pointer == 'link3') { var pagetitle = linktitle_3_es; } else if (pointer == 'link4') { var pagetitle = linktitle_4_es; } else if (pointer == 'link5') { var pagetitle = linktitle_5_es; } else if (pointer == 'link6') { var pagetitle = linktitle_6_es; } }
		else if (bodyclassName == "au")	{ if (pointer == 'link1') { var pagetitle = linktitle_1_au; } else if (pointer == 'link2') { var pagetitle = linktitle_2_au; } else if (pointer == 'link3') { var pagetitle = linktitle_3_au; } else if (pointer == 'link4') { var pagetitle = linktitle_4_au; } else if (pointer == 'link5') { var pagetitle = linktitle_5_au; } else if (pointer == 'link6') { var pagetitle = linktitle_6_au; } }
		else if (bodyclassName == "ru")	{ if (pointer == 'link1') { var pagetitle = linktitle_1_ru; } else if (pointer == 'link2') { var pagetitle = linktitle_2_ru; } else if (pointer == 'link3') { var pagetitle = linktitle_3_ru; } else if (pointer == 'link4') { var pagetitle = linktitle_4_ru; } else if (pointer == 'link5') { var pagetitle = linktitle_5_ru; } else if (pointer == 'link6') { var pagetitle = linktitle_6_ru; } }
		else 							{ if (pointer == 'link1') { var pagetitle = linktitle_1_gb; } else if (pointer == 'link2') { var pagetitle = linktitle_2_gb; } else if (pointer == 'link3') { var pagetitle = linktitle_3_gb; } else if (pointer == 'link4') { var pagetitle = linktitle_4_gb; } else if (pointer == 'link5') { var pagetitle = linktitle_5_gb; } else if (pointer == 'link6') { var pagetitle = linktitle_6_gb; } }

		// ##### DEFAULT TO GB IF TEXT IS BLANK										
		if ($.trim(pagetitle) == "") { pagetitle = linktitle_1_gb; }
		if ($.trim(pagetitle) == "") { pagetitle = linktitle_2_gb; }
		if ($.trim(pagetitle) == "") { pagetitle = linktitle_3_gb; }
		if ($.trim(pagetitle) == "") { pagetitle = linktitle_4_gb; }
		if ($.trim(pagetitle) == "") { pagetitle = linktitle_5_gb; }
		if ($.trim(pagetitle) == "") { pagetitle = linktitle_6_gb; }

		// "EDIT'S:" TEXT (IN MENUBAR)

			if (bodyclassName == "us") 		{ var pageeditstext = pageedittext_us; }
		else if (bodyclassName == "fr")		{ var pageeditstext = pageedittext_fr; }
		else if (bodyclassName == "de")		{ var pageeditstext = pageedittext_de; }
		else if (bodyclassName == "it")		{ var pageeditstext = pageedittext_it; }
		else if (bodyclassName == "es")		{ var pageeditstext = pageedittext_es; }
		else if (bodyclassName == "au")		{ var pageeditstext = pageedittext_au; }
		else if (bodyclassName == "ru")		{ var pageeditstext = pageedittext_ru; }
		else								{ var pageeditstext = pageedittext_gb; }

		// ##### DEFAULT TO GB IF TEXT IS BLANK										
		if ($.trim(pageeditstext) == "") { pageeditstext = pageedittext_gb; }

		


		// ##### CHANGE THE PAGE TEXT AND PAINT IT BLACK
		$('#text p').html(pagetext);
		$('#text p').css('color', '#000');

		//$('#text').css('position', 'relative');
		if (pointer == "link1")
			{
				//$('#text').css('top', '10px');
				//$('#text').css('left', '0px');
				//$('#text').css('border', '0px solid #00f');
				//$('#text p').css('width', 'auto');
			}

		// ##### CHANGE THE TITLE TEXT AND PAINT IT BLACK
		$('#pretitle').text($.trim(pretitle));
		$('#pretitle').css('color', '#000');
		//$('#maincontent_center h1').text($.trim(heading));
		$('#maincontent_center h1').html(heading);
		$('#maincontent_center h1').css('color', '#000');

		// ##### CHANGE THE "EDIT'S:" TEXT 
		$('.static').text($.trim(pageeditstext));

		
		// ##### REDUCE H1 TEXT SIZE IF IT IS TOO WIDE (ITALIAN VERSION HAS VERY LONG H1 TEXT)
		// if ($("#maincontent_center").width() > "420")
		// 	{
		// 		$("#maincontent_center h1").css('font-size', '28px');
		// 		// ADD A BIT OF PADDING AT THE TOP SO THAT IT ALIGNS WELL VERTICALLY
		// 		$("#maincontent_center h1").css('padding-top', '8px');
		// 	}
		


		// RE-ALIGN TEXT IN NAVIGATION IF IT IS THE SALES PAGE (BLACK BORDER SEEMS TO PUSH THE NAV DOWN A BIT)
		if ((specialcontent == "sales") && (pointer == "link6"))
			{
				$(".creative #boxholder #linksholder .static").css("padding-top", "6px");
				$(".creative #boxholder #linksholder ul li").css("line-height", "14px");
			}
		


		
		// ##### GET OVERALL WIDTH OF LIST ITEMS
		var linksWidth = $('.links').width();
		//console.log("linksWidth: "+linksWidth);

		// ##### CALCULATE HOW MUCH PADDING IS NEEDED FOR EACH LIST ITEM TO GET IT UP TO (NEAR) 635px WIDE
		//var paddingWidth = Math.ceil((635 - linksWidth)/12);

		// ##### ADD THIS EXTRA PADDING AND MAKE SURE THE LIST HOLDER IS EXACTLY 635px WIDE SO THERE'S NO WHITE SPACE
		//$('.creative #linksholder .links li a').css('padding', '0.2em '+(paddingWidth+9)+'px');
		// HERE $('.creative #linksholder .links li a').css('padding', '0.2em '+(paddingWidth-1)+'px');
		//$('.creative #linksholder .links li a').css('background-color','#333');
		//console.log("paddingWidth: "+paddingWidth);
		// HERE $('.creative #linksholder .links').css('width', '638px');	
		//$('#linksholder .links').css('background-color', '#aa0');	

		// IF THE OVERALL LIST IS STILL A FEW PIXELS SHORT, ADD THESE FEW PIXELS TO THE LAST LIST ITEM
		var linksWidth_new = 635 - $('#linksholder').width();

		var lastWidth = Math.floor(linksWidth_new/2)-12;
		//console.log("lastWidth: "+lastWidth);
		//$('.creative .last a').css('padding', '0.2em '+(((paddingWidth)+lastWidth))+'px');
		//$('.creative .last a').css('background-color', '#808');		
		

		/*
		// ##### GET OVERALL WIDTH OF LIST ITEMS
		var linksWidth = $('.links').width();
		//console.log("linksWidth: "+linksWidth);

		// ##### CALCULATE HOW MUCH PADDING IS NEEDED FOR EACH LIST ITEM TO GET IT UP TO (NEAR) 635px WIDE
		var paddingWidth = Math.ceil((635 - linksWidth)/12);

		// ##### ADD THIS EXTRA PADDING AND MAKE SURE THE LIST HOLDER IS EXACTLY 635px WIDE SO THERE'S NO WHITE SPACE
		$('.creative #linksholder .links li a').css('padding', '0.2em '+(paddingWidth+9)+'px');
		//console.log("paddingWidth: "+paddingWidth);
		$('.creative #linksholder .links').css('width', '638px');	
		//$('#linksholder .links').css('background-color', '#aa0');	
		*/

		// XMAS SALES LINK ONLY SPECIFIC CSS
		if ((specialcontent == "sales") && (pointer == "link6"))
			{

				$('.creative .links .link6 a').css('color', 'color:#d70014 !important');
				$('.creative .links .link6 a').css('text-decoration', 'none !important');

				$('.creative #boxholder #text p').css('width', '360px');
				$('.creative #boxholder #text').css('width', '360px');
				$('.creative #boxholder #text').css('left', '184px');
				//$('.creative #boxholder #text').css('background-color', '#ccc');

				$('.creative #boxholder #text p').css('color', '#000 !important');
				$('.creative #boxholder #text p').css('font-size', '16px !important');

				$('.creative #boxholder h1').css('color', '#d70014 !important');
				$('.creative #boxholder h1').css('font-size', '48px !important');

				$('.creative #boxholder').css('border', '3px solid #000');
				$('.creative #boxholder').css('padding', '3px');
				$('.creative #boxholder').css('padding-bottom', '0px');
				$('.creative #boxholder').css('height', '280px');

				$('.creative #boxholder #arrow').css('top', '33px');

				$('.creative #boxholder #linksholder ul').css('margin-right', '0px');
				$('.creative #boxholder #linksholder ul').css('float', 'right');

				// INCREASE WIDTH OF TEXTBOX FOR ITALIAN PAGE AS THERE'S SO MUCH TEXT
				if (bodyclassName == "it") 	
					{ 
						$('.creative #boxholder #text p').css('width', '550px'); 
						$("#maincontent #text").css('left', '89px');
						//$("#maincontent #text").css('background-color', '#ccc');
						//$("#maincontent #text p").css('background-color', '#f00');
					} 

				// ACOUNT FOR THE 3px BORDER AND MAKE SURE THAT THE BOX DOESN'T GO WIDER EVEN IF THERE IS THIS BORDER

				$('.creative #boxholder').css('width', '746px');	
				$('.creative #boxholder #linksholder').css('width', '746px');
				$('.creative #boxholder #maincontent').css('width', '728px');
				$('.creative #boxholder #maincontent').css('height', '226px');
	
			}

		// ##### GET THE WIDTHS AND THEIR LEFT OFFSET OF EACH LIST ITEM SO THE ARROW'S POSITION CAN BE CALCULATED
		var link1Width = $('.creative .link1').width();		var link1Left = $('.creative .link1').position();
		var link2Width = $('.creative .link2').width();		var link2Left = $('.creative .link2').position();
		var link3Width = $('.creative .link3').width();		var link3Left = $('.creative .link3').position();
		var link4Width = $('.creative .link4').width();		var link4Left = $('.creative .link4').position();
		var link5Width = $('.creative .link5').width();		var link5Left = $('.creative .link5').position();
		var link6Width = $('.creative .link6').width();		var link6Left = $('.creative .link6').position();
		/*
		console.log('link1Width: ' + link1Width);
		console.log('link2Width: ' + link2Width);
		console.log('link3Width: ' + link3Width);
		console.log('link4Width: ' + link4Width);
		console.log('link5Width: ' + link5Width);
		console.log('link6Width: ' + link6Width);
		*/

		// ##### GET ALL THE URLS SO A MATCH CAN BE SEARCHED FOR
		var link1URL = $(".creative .link1 a").attr("href");
		var link2URL = $(".creative .link2 a").attr("href");
		var link3URL = $(".creative .link3 a").attr("href");
		var link4URL = $(".creative .link4 a").attr("href");
		var link5URL = $(".creative .link5 a").attr("href");
		var link6URL = $(".creative .link6 a").attr("href");

		// ##### LOOK FOR THE cid= IN THE QUERYSTRING
		var link1URL_cid = link1URL;
		var link2URL_cid = link2URL;
		var link3URL_cid = link3URL;
		var link4URL_cid = link4URL;
		var link5URL_cid = link5URL;
		var link6URL_cid = link6URL;

		// ##### SEARCH FOR MATCH
		var matchtest1 = link1URL_cid.match('cid=' + querystring_cid); 
		var matchtest2 = link2URL_cid.match('cid=' + querystring_cid); 
		var matchtest3 = link3URL_cid.match('cid=' + querystring_cid); 
		var matchtest4 = link4URL_cid.match('cid=' + querystring_cid); 
		var matchtest5 = link5URL_cid.match('cid=' + querystring_cid); 
		var matchtest6 = link6URL_cid.match('cid=' + querystring_cid); 

		// ##### MOVE ARROW INTO POSITION 
		// ##### THE ARROW AUTOMATICALLY MOVES TO THE LINK WITH THE SAME cid AS WHAT'S IN THE URL OF THE PAGE
		// ##### IF NO cid MATCH IS FOUND IT DEFAULTS TO FIRST POSITION
			if (pointer == "link2")		{	var arrowPosition = link2Left.left + (link2Width/2);	}
		else if (pointer == "link3")	{	var arrowPosition = link3Left.left + (link3Width/2);	}
		else if (pointer == "link4")	{	var arrowPosition = link4Left.left + (link4Width/2);	}
		else if (pointer == "link5")	{	var arrowPosition = link5Left.left + (link5Width/2);	}
		else if (pointer == "link6")	{	var arrowPosition = link6Left.left + (link6Width/2);	}
		else							{	var arrowPosition = link1Left.left + (link1Width/2);	}

		// ##### MOVE IT
		$('#arrow').css('left', (arrowPosition-12)+'px');

		// ADD UNDERLINE TO TEXT LINK
			if (pointer == "link2")		{	var arrowPosition = link2Left.left + (link2Width/2);	}
		else if (pointer == "link3")	{	var arrowPosition = link3Left.left + (link3Width/2);	}
		else if (pointer == "link4")	{	var arrowPosition = link4Left.left + (link4Width/2);	}
		else if (pointer == "link5")	{	var arrowPosition = link5Left.left + (link5Width/2);	}
		else if (pointer == "link6")	{	var arrowPosition = link6Left.left + (link6Width/2);	}
		else							{	var arrowPosition = link1Left.left + (link1Width/2);	}

		// // ##### CHANGE BORDER COLOR
		// 	if (pointer == "link2")		{	$('.creative #boxholder #maincontent').css('border', '10px solid #91a892');		}
		// else if (pointer == "link3")	{	$('.creative #boxholder #maincontent').css('border', '10px solid #cf746f');		}
		// else if (pointer == "link4")	{	$('.creative #boxholder #maincontent').css('border', '10px solid #2a7b9a');		}
		// else if (pointer == "link5")	{	$('.creative #boxholder #maincontent').css('border', '10px solid #bc3f4a');		}
		// else if (pointer == "link6")	{ 	$('.creative #boxholder #maincontent').css('border', '10px solid #caa225'); 	}		
		// else							{	$('.creative #boxholder #maincontent').css('border', '10px solid #d7d8da');		}
		// if (specialcontent == "sales")
		// 	{
		// 		// ##### CHANGE BORDER COLOR TO SALES COLOUR
		// 		if (pointer == "link6")	{	$('.creative #boxholder #maincontent').css('border', '10px solid #d70014');}
		// 	}

		// ##### CHANGE BORDER GRADIENT IMAGE
			 if (pointer == "link2")	{	$('.creative #borderbg').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_grad2.png") no-repeat');		}
		else if (pointer == "link3")	{	$('.creative #borderbg').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_grad3.png") no-repeat');		}
		else if (pointer == "link4")	{	$('.creative #borderbg').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_grad4.png") no-repeat');		}
		else if (pointer == "link5")	{	$('.creative #borderbg').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_grad5.png") no-repeat');		}
		else if (pointer == "link6")	{ 	$('.creative #borderbg').css('background', '#f7f18d');		}		
		else							{	$('.creative #borderbg').css('background', 'http://images.asos.com/htmlpages/140303-Women-Daily-Edit/bg_grad1.png") no-repeat');		}
		if (specialcontent == "sales")
			{
				// ##### CHANGE BORDER GRADIENT IMAGE
				if (pointer == "link6")	{	$('.creative #borderbg').css('background', 'url("http://images.asos.com/htmlpages/140407-Women-Daily-Edit/bg_grad-sale.png") no-repeat');}
			}

		// ##### CHANGE BACKGROUND IMAGES  															left image url here																																			right image url here
			if (pointer == "link2")		{	$('.creative #maincontent_left').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link2_left.png") no-repeat 100% 28%');	$('.creative #maincontent_right').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link2_right.png") no-repeat 0 28%');	}
		else if (pointer == "link3")	{	$('.creative #maincontent_left').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link3_right.png") no-repeat 100% 28%');	$('.creative #maincontent_right').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link3_right.png") no-repeat 0 28%');	}
		else if (pointer == "link4")	{	$('.creative #maincontent_left').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link1_right.png") no-repeat 100% 28%');	$('.creative #maincontent_right').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link1_right.png") no-repeat 0 28%');	}
		else if (pointer == "link5")	{	$('.creative #maincontent_left').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link5_left.png") no-repeat 100% 28%');	$('.creative #maincontent_right').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link5_right.png") no-repeat 0 28%');	}
		else if (pointer == "link6") 	{ 	$('.creative #maincontent_left').css('background', 'none'); $('.creative #maincontent_right').css('background', 'none'); }
		else							{	$('.creative #maincontent_left').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link1_right.png") no-repeat 100% 28%'); $('.creative #maincontent_right').css('background', 'url("http://images.asos.com/htmlpages/140217-Women-Daily-Edit/bg_link1_right.png") no-repeat 0 28%'); }
		if (specialcontent == "sales")
			{
				// ##### CHANGE BACKGROUND IMAGES TO SALES IMAGE													left image url here																																			right image url here
				if (pointer == "link6") 	{ 	$('.creative #maincontent_left').css('background', 'url("http://images.asos.com/htmlpages/140324-Women-Daily-Edit/bg_link6_right.png") no-repeat 100% 26%") no-repeat 100% 26%'); $('.creative #maincontent_right').css('background', 'url("http://images.asos.com/htmlpages/140324-Women-Daily-Edit/bg_link6_right.png") no-repeat 100% 26%") no-repeat 0 26%'); }
			}
			
		// ##### CHANGE RIGHT IMAGE TO FIXED WIDTH
			if (pointer == "link2")		{	$('.creative #boxholder #maincontent_right').css('width', '244px');		}
		else if (pointer == "link3")	{	$('.creative #boxholder #maincontent_right').css('width', '244px');		}
		else if (pointer == "link4")	{	$('.creative #boxholder #maincontent_right').css('width', '244px');		}
		else if (pointer == "link5")	{	$('.creative #boxholder #maincontent_right').css('width', '244px');		}
		else if (pointer == "link6")	{	$('.creative #boxholder #maincontent_right').css('width', '244px');		}
		else							{	$('.creative #boxholder #maincontent_right').css('width', '244px');		}

		//$('.creative #boxholder #maincontent_right').css('background-color', '#ff0');
		//$('.creative #boxholder #maincontent_left').css('background-color', '#ff0');
		
		// ##### UNDERLINE THE SELECTED LINK
			if (pointer == "link2")		{	$('.link2 a').addClass('selected'); 	}
		else if (pointer == "link3")	{	$('.link3 a').addClass('selected'); 	}
		else if (pointer == "link4")	{	$('.link4 a').addClass('selected'); 	}
		else if (pointer == "link5")	{	$('.link5 a').addClass('selected'); 	}
		else if (pointer == "link6")	{	$('.link6 a').addClass('selected'); 	}
		else							{	$('.link1 a').addClass('selected'); 	}
		
		// ##### ADJUST CENTRAL COLUMN DEPENDING ON TEXT
		var h1Width = $(".creative #boxholder #maincontent_center h1").width();
		h1Width = h1Width+20;									// ADD A LITTLE PADDING LEFT AND RIGHT
		if (h1Width < 220) { h1Width = 220; }					// MINIMUM WIDTH FOR THE CENTER DIV
		// calculate width of #maincontent_left and #maincontent_right depending on the width of the h1
		var maincontent_left_width = (738 - h1Width)/2;
		var maincontent_right_width = (738 - h1Width)/2;
		var overallWidth = maincontent_left_width + h1Width + maincontent_right_width;
		$('.creative #boxholder #maincontent_left').css('width', maincontent_left_width+'px');
		$('.creative #boxholder #maincontent_center').css('width', h1Width+'px');
		$('.creative #boxholder #maincontent_center h1').css('width', h1Width+'px');
		$('.creative #boxholder #maincontent_right').css('width', maincontent_right_width+'px');

		$('.creative #boxholder #maincontent_center.left-col').css('width', '410px');
		$('.creative #boxholder #maincontent_center.left-col h1.left-col').css('width', '390px');
		$('.creative #boxholder #maincontent_right.image').css('width', '327px !important');

		if ((specialcontent == "sales") && (pointer == "link6"))
			{
				$('.creative #boxholder #maincontent_left').css('width', ($('.creative #boxholder #maincontent_left').width())-6+"px");
				$('.creative #boxholder #maincontent_right').css('width', ($('.creative #boxholder #maincontent_right').width())-6+"px");
			}

	}
);


